﻿// <copyright file="ConnexityBreakpoint.cs" company="Ecole Normale Supérieure">
// Released under GPLv2
// </copyright>
// <summary>Contains the ConnexityBreakpoint class</summary>

namespace Sqwarea.Persistence
{
    using System.Drawing;
    using System.Runtime.Serialization;

    /// <summary>
    /// Serialised, used to store the points to be verified 
    /// by the ConnexityProvider in a queue.
    /// </summary>
    [DataContract]
    public class ConnexityBreakpoint
    {
        /// <summary>
        /// Initializes a new instance of the ConnexityBreakpoint class.
        /// </summary>
        /// <param name="position">position of the square to be treated</param>
        /// <param name="formerKingId">former owner of the square to be treated</param>
        public ConnexityBreakpoint(Point position, long formerKingId)
        {
            Position = position;
            FormerKingId = formerKingId;
        }

        /// <summary>
        /// Gets the position of the square to be treated.
        /// </summary>
        [DataMember]
        public Point Position { get; private set; }

        /// <summary>
        /// Gets the id of the former owner of the square to be treated.
        /// </summary>
        [DataMember]
        public long FormerKingId { get; private set; }
    }
}
